﻿using System;
using System.Collections.Generic;
using System.Text;
using AspNetCs.DALFactory;
using AspNetCs.IDAL;
using AspNetCs.Model;
using System.Data;
using System.Web;
namespace AspNetCs.Bll
{
    public class Admin
    {
        private IAdmin Master = Conn.CreateAdmin();

        #region IAdmin 成员
        /// <summary>
        /// 0表示登录成功,-1表示登录失败
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int AdminLogin(Admin_Model model)
        {
            if (model == null)
            {
                return -1;
            }
            return Master.AdminLogin(model);
        }
        /// <summary>
        /// 根据DataRow,返回管理员信息
        /// </summary>
        /// <param name="dr"></param>
        /// <returns></returns>
        public Admin_Model GetModel(DataRow dr)
        {
            return Master.GetModel(dr);
        }
        public Admin_Model GetModel(int id)
        {

            return Master.GetModel(id);
        }

        #endregion


    }
}
